package io.renren.modules.course.service;

import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.modules.course.entity.CourseBodyEntity;
import io.renren.modules.course.entity.TreeEntity;
import io.renren.modules.myCourse.entity.ChooseTestEntity;
import io.renren.modules.sys.entity.SysDeptEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-07-03 16:11:00
 */
public interface CourseBodyService extends IService<CourseBodyEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<TreeEntity> courseBodyService();

    List<CourseBodyEntity> queryList(Map<String, Object> map);
    List<CourseBodyEntity> queryListByCourseName(String courseName);

    /**
     * 查询子部门ID列表
     * @param parentId  上级部门ID
     */
    List<Long> queryDetpIdList(Long parentId);

    /**
     * 获取子部门ID，用于数据过滤
     */
    List<Long> getSubDeptIdList(Long deptId);

    List<TreeEntity> getCourseTree(Integer id);

    List<TreeEntity> getCourseTreeGen(Integer id);

    void uploadTest(Map map);

    ChooseTestEntity getInfoById(int id);

    CourseBodyEntity getCourseBodyById(int id);

    int getCourseIdByCourseBodyId(int courseBodyId);

    void deleteCourseTest(int searching);
    R uploadTests(MultipartFile file);

    R changeCourseToSmall(MultipartFile file,Long teacherId);
}

